package ycj.learn.spring.ioc.common;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class InventoryService {

    private final UserService userService;

    public InventoryService(UserService userService) {
        this.userService = userService;
    }

    public void add(String user, int num) {
        log.info("用户：{}，新增货：{}", user, num);
    }

    public void subtract(String user, int num) {
        log.info("用户：{}，减少货：{}", user, num);
    }

}
